import sys  
import os  
def name(args):
    files=os.listdir(args)
    print('input:'+args)
    for file in files:
        li=file.split("_")
        newfile=args+'/'+li[1]+'.pdf'
        oldflle=args+'/'+file
        #print(args+'/'+file)
        os.rename(oldflle,newfile)

if __name__ == '__main__':  
    name(sys.argv[1])